<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport"
			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
	</head>
	<style type="text/css">
		.bgxq img {
			width: 60px;

		}
	</style>
	<body>
		<!-- 标题栏-start -->
		<header class="mui-bar mui-bar-nav" style="box-shadow: none;background-color: white;">
			<a style="color: #000000;" class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">随手拍</h1>
		</header>
		<!-- 标题栏-end -->
		<div class="mui-content" style="background-color: white;">
			<p style="margin-left: 10px;font-size: 18px;">报告详情</p>
			<div class="bgxq" style="margin-left: 10px;border-bottom: #aaa 1px solid;display: flex;">
				<img src="images/jianyan/shangchuan.png" id="shangchuan">
			</div>
			<div style="padding-left: 20px;">
				<div class="mui-input-row"
					style="border-bottom:1px solid #8F8F94;padding-top: 10px;padding-bottom: 10px;">
					<label>主体</label>
					<input type="text" class="mui-input-clear" placeholder="请输入">
				</div>
				<div class="mui-input-row"
					style="border-bottom:1px solid #8F8F94;padding-top: 10px;padding-bottom: 10px;">
					<label>地点</label>
					<input type="text" class="mui-input-clear" placeholder="请输入">
				</div>
				<div class="mui-input-row"
					style="border-bottom:1px solid #8F8F94;padding-top: 10px;padding-bottom: 10px;">
					<label>姓名</label>
					<input type="text" class="mui-input-clear" value="王小明" placeholder="请输入">
				</div>
				<div class="mui-input-row"
					style="border-bottom:1px solid #8F8F94;padding-top: 10px;padding-bottom: 10px;">
					<label>手机号</label>
					<input type="text" class="mui-input-clear" value="13312341234" placeholder="请输入">
				</div>
			</div>
			<div style="margin-left: 5px;margin-top: 20px;">
				<label>详细内容</label>
				<textarea rows="5" cols="" placeholder="请输入文字"></textarea>
			</div>
		</div>
		<div style="display: flex;justify-content: center;margin-top: 2.25rem;">
			<button type="button" onclick="tiaozhuan1()"
				style="border: none;line-height: 7px;height: 36px;width: 80vw;background-color: red;"
				class="mui-btn mui-btn-blue mui-btn-block">上传</button>
		</div>
		<script src="js/mui.js"></script>
		<script type="text/javascript">
			mui.init()
			let shangchuan = document.querySelector("#shangchuan")
			mui.plusReady(function() {
				shangchuan.addEventListener("tap", function() {
					plus.gallery.pick(function(Path) {
						let sc = document.querySelector(".bgxq")
						let div = document.createElement("div")
						div.innerHTML = `<div onclick='clearImg()' class="class-icon mui-pull-right">x</div>
			    				<img onclick="toReady()" style="margin-left: 10px; max-width: 60px; max-height: 60px;"
			    					src="${Path}">`
						// sc.appendChild(div)
						sc.insertBefore(div, shangchuan)
					}, function() {})
				})
			})

			function clearImg() {
				let sc = document.querySelector(".bgxq")
				sc.innerHTML = `<img src="images/jianyan/shangchuan.png" id="shangchuan">`
				// let div = document.createElement("div")

			}

			function tiaozhuan1() {
				if (!localStorage.getItem("admin")) {
					mui.confirm('再登录后再进行操作', '登录', ['取消', '确认'], function(e) {
						console.log(e)
						if (e.index === 1) {
				
							tiaozhuan('login.html')
						} else {
							e.index
						}
					}, 'div')
					return
				}
				localStorage.setItem("ssp", true)
				tiaozhuan('sccg.html')
			}
		</script>
	</body>
</html>
